package com.winit.openapi.tms.controller;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;

import com.winit.openapi.controller.BaseController;
import com.winit.openapi.model.RequestMsg;
import com.winit.openapi.model.ResponseMsg;
import com.winit.tms.spi.common.CabinetTypeService;
import com.winit.tms.spi.common.vo.CabinetTypeVo;

@Controller
@RequestMapping(value = "/tms/cabinetType")
public class CabinetTypeController extends BaseController {

    @Resource
    private CabinetTypeService cabinetTypeService;

    /**
     * 获取柜型
     * 
     * @param requestMsg
     * @param responseMsg
     * @return
     */
    @RequestMapping(value = "/queryCabinetType")
    public String queryCabinetType(@ModelAttribute RequestMsg requestMsg, @ModelAttribute ResponseMsg responseMsg) {
        List<CabinetTypeVo> list = cabinetTypeService.queryCabinetType();
        Map<String, Object> data = new HashMap<String, Object>();
        data.put("list", list);
        responseMsg.setData(data);
        return SUCCESS;
    }
}
